package cn.electronic.sale.service.imp;

import java.util.Date;
import java.util.List;

import org.junit.Test;
import org.springframework.stereotype.Service;

import cn.electronic.sale.pojo.Goods;
import cn.electronic.sale.pojo.GoodsCustom;
import cn.electronic.sale.pojo.GoodsQueryVo;
import cn.electronic.sale.service.GoodsService;
@Service
public class GoodsServiceImp extends BasicServiceImp implements GoodsService {
	
	public void insertGoodsSelective(Goods goods) throws Exception {
		// TODO Auto-generated method stub
		
		goodsMapper.insertSelective(goods);
	}

	public List<GoodsCustom> selectAllGoodsInfo() throws Exception {
		// TODO Auto-generated method stub
		return goodsMapper.selectAllGoodsInfo();
	}


	public void deleteGoodsByPrimaryKey(Integer goodsId) throws Exception {
		// TODO Auto-generated method stub
		goodsMapper.deleteByPrimaryKey(goodsId);
	}

	public GoodsCustom selectAllGoodsInfoByPrimaryKey(Integer goodsId)
			throws Exception {
		// TODO Auto-generated method stub
		
		return goodsMapper.selectAllGoodsInfoByPrimaryKey(goodsId);
	}

	/* (non-Javadoc)
	 * @see cn.electronic.sale.service.GoodsService#selectGoodsByCondition(cn.electronic.sale.pojo.GoodsQueryVo)
	 */
	public List<Goods> selectGoodsByCondition(GoodsQueryVo goodsQueryVo)
			throws Exception {
		// TODO Auto-generated method stub
		return goodsMapper.selectGoodsByCondition(goodsQueryVo);
	}
}

